<script setup lang="ts">
</script>

<template>
  <div class="app-container">
    <nav class="navbar">
      <div class="nav-brand">
        <h3>股票管理系统</h3>
      </div>
      <ul class="nav-menu">
        <li class="nav-item">
          <router-link to="/" class="nav-link">首页</router-link>
        </li>
        <li class="nav-item">
          <router-link to="/kpl-stocks" class="nav-link">KPL股票列表</router-link>
        </li>
      </ul>
    </nav>
    <div class="main-content">
      <router-view></router-view>
    </div>
  </div>
</template>

<style scoped>
.app-container {
  display: flex;
  min-height: 100vh;
}

.navbar {
  width: 250px;
  background-color: #333;
  color: white;
  padding: 1rem;
  box-shadow: 2px 0 4px rgba(0,0,0,.1);
}

.nav-brand h3 {
  margin: 0 0 2rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #555;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-link:hover {
  background-color: #555;
}

.nav-link.router-link-active {
  background-color: #007bff;
}

.main-content {
  flex: 1;
  padding: 2rem;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>